#include"Processbar.h"
#include<string.h>
#include<unistd.h>   
//void test()
//{
//  printf("Hello World!\n");
//}

#define length 101
#define style '='

const char *lable = "|/-\\";

void ProcBar()
{
  char bar[length];
  memset(bar,'\0',sizeof(bar));

  int cnt=0;
  while(cnt<=100)
  {
    printf("[%-100s][%c][%3d%%]\r",bar,lable[cnt%4],cnt);
    bar[cnt++] = style;
    fflush(stdout);
    usleep(20000);
  }
  printf("\n");
}
